package org.com.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.com.pojo.Farms;
import org.com.vo.FarmApplyVO;

import java.math.BigDecimal;
import java.util.List;

/**
* @author 86134
* @description 针对表【farms】的数据库操作Service
* @createDate 2025-02-27 16:34:37
*/
public interface FarmsService extends IService<Farms> {
    boolean addFarms(Farms farms,String url);
    public List<Farms> getUserFarms(Integer userId);
    List<FarmApplyVO> getApplyFarms();
    
    /**
     * 审批通过农场申请
     * @param farmId 农场ID
     * @param adminUserId 管理员用户ID
     * @param farmUserId 农场所有者用户ID
     * @param amount 补贴金额
     * @return 处理结果
     */
    boolean approveFarmApplication(Integer farmId, Integer adminUserId, Integer farmUserId, BigDecimal amount);
    
    /**
     * 获取农场的所有图片
     * @param farmId 农场ID
     * @return 图片URL列表
     */
    List<String> getFarmImages(Integer farmId);

    boolean updateFarmInfo(Farms farm, List<String> newImageUrls, List<String> deletedImageUrls);
}
